#include "connectmanager.h"

ConnectManager::ConnectManager(QObject *parent) :
    QObject(parent)
{       
    socket = new QTcpSocket;
    socket->connectToHost("192.168.0.199", 1433);
}

ConnectManager::~ConnectManager()
{

}

void ConnectManager::aboutHost()
{
    qDebug()<<socket->state();
    if (socket->state() == QAbstractSocket::ConnectedState)
        status = true;
    else
        status = false;
    emit hostStatusInfo(status);
    socket->disconnectFromHost();
    socket = new QTcpSocket;
    socket->connectToHost("192.168.0.199", 1433);
}
